import request from '@/utils/request';

//新增标签组
export function userTagGroupAdd(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/group-add',
        method: 'POST',
        data,
        noNeedLoading: true
    });
}

//获取标签组列表
export function userTagGroupList(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/group-list',
        method: 'GET',
        params: data,
        noNeedLoading: true
    });
}
//更新标签组
export function userTagGroupUpdate(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/group-put',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
//更新标签组
export function userTagGroupDel(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/group-del',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
//获取标签列表
export function userTagList(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/user-tag-page',
        method: 'get',
        params: data,
        noNeedLoading: true
    });
}
//新增标签
export function userTagAdd(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/user-tag-add',
        method: 'post',
        data
    });
}
//更新标签
export function userTagUpdate(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/user-tag-put',
        method: 'post',
        data
    });
}
//删除标签
export function userTagDel(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/user-tag-del',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
//批量删除标签
export function userTagPatchDel(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/tag-patch-del',
        method: 'post',
        data
    });
}
//批量更换标签组
export function userTagPatchUpdate(data: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/patch-set-group',
        method: 'post',
        data
    });
}
//标签同步
export function userTagSync(data?: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/sync',
        method: 'post',
        data
    });
}
//标签同步-异步提交
export function userTagSbmit(data?: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/start-sync',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
//标签同步-异步结果
export function userTagResults(data?: any) {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/result-sync',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
//获取标签最近同步时间
export function userTagSyncTime() {
    return request({
        url: '/scrm-api/console/work/contact/user-tag/last-sync-time',
        method: 'get',
        noNeedLoading: true
    });
}
